package com.stu.covid.business.controller;

import com.stu.covid.business.entity.vo.ReportEchartVO;
import com.stu.covid.business.service.ReportService;
import com.stu.covid.business.utils.CodeMsg;
import com.stu.covid.business.utils.Result;
import com.stu.covid.business.utils.ResultFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;


@Controller
public class ReportController {

    @Autowired
    private ReportService reportService;

    @RequestMapping("/report-echart")
    @ResponseBody
    public Result<ReportEchartVO> reportEchart() {
        ReportEchartVO reportEchartVO = reportService.reportEchart();
        Result result = ResultFactory.bulid(CodeMsg.SUCCESS, reportEchartVO);
        return result;
    }

}
